package main

import (
	"fmt"
	"spider/common"
	"spider/fetcher"
)

func main() {
	url:="https://i.waimai.meituan.com/openh5/channel/kingkongshoplist?_=1585381034922&X-FOR-WITH=%2FIEdyjDDwwvr3y4nSqZ9KDn9EL8SPA8DPd%2BNVzmmjbio35KErxDVEwtdrTR7JZjlMGGx%2Btvn2bc%2BSg1Btu4goyzZw%2FPBbegUyyaGbhPb%2BvlMWo37%2BKGFFmH%2FKEcqmSG9o9i95jyLdBVGbygEgH0%2FhOKT1M11rTBt%2Flnl3Ft2h7hgVmsnc2sZ5zlgHTYBDQpIuQYi0ln19N9wW%2FohHFXMeA%3D%3D"
	//url="http://39.100.78.46/test.php"

	//url=`https://i.waimai.meituan.com/openh5/homepage/poilist?_=1585565087441&X-FOR-WITH=QhDdBZr3QbU5QzrHyTUwbcGAVQKiOEJux44ZtTgqmGVRlziF7V5pCoSRgAVOjZ6BPicqwX3NF7TjS403mtFuAZVh2%2FJ6eEWR6GmJoYPXMLY96gtZFVYxUqE0Yhyp2CGH9ixOkuDi5wazrn0AvrHMea8FOiAaJanXilj3SbSv28oWctDA3oQ01FZeKaLPA5EdwtQcQ4wMBok4OUHVT4gRxQ%3D%3D`
	header:=map[string]string{}
	cookie:=`IJSESSIONID=krnrxojhyg5u1mla3q2hfakhj; _lxsdk_cuid=170f768f6b1c8-0d77ee74f3cebd-6a177a22-448e0-170f768f6b15b; _lxsdk=5737EF407F90A002AE885E541B62D03F943F2FC4EC7B5C511C5560B5E6574FCC; webp=1; ci3=1; cityname=%E5%8C%97%E4%BA%AC; __utma=74597006.1422517486.1584698817.1584698817.1584698817.1; __utmc=74597006; __utmz=74597006.1584698817.1.1.utmcsr=sm.cn|utmccn=sm.cn|utmcmd=organic|utmctr=%E7%BE%8E%E5%9B%A2|utmcct=100037; i_extend=C_b1Gimthomepagecategory11H__a; uuid=74bba31d-8502-4fce-901d-243895502334; _hc.v=ffd573f4-9547-a837-1ec3-752c000f1fa6.1584698829; ci=1; meishi_ci=1; cityid=1; JSESSIONID=14ux46lbfirmx28s816b045d3; c_6NCia=1; ; __mta=250003129.1584699068850.1584699068850.1584699068850.1; w_addr=%E6%9C%9D%E9%98%B3%E5%8C%BA%E7%94%98%E9%9C%B2%E5%9B%AD%E5%8D%97%E9%87%8C%E4%BA%8C%E5%8C%BA(102%E5%9B%BD%E9%81%93%E5%8D%97); utm_source=0; wx_channel_id=0; channelType={%22default%22:%220%22}; iuuid=5737EF407F90A002AE885E541B62D03F943F2FC4EC7B5C511C5560B5E6574FCC; token=IplXXLaGAatRU7wP5Z9w0etMSdUAAAAAQQoAAJtRnplGfuryswMbk4X1ow9Ihk0iz5gLak89Honu6L9nmcoKF1wsMD0Y70TmpnqCsw; mt_c_token=IplXXLaGAatRU7wP5Z9w0etMSdUAAAAAQQoAAJtRnplGfuryswMbk4X1ow9Ihk0iz5gLak89Honu6L9nmcoKF1wsMD0Y70TmpnqCsw; oops=IplXXLaGAatRU7wP5Z9w0etMSdUAAAAAQQoAAJtRnplGfuryswMbk4X1ow9Ihk0iz5gLak89Honu6L9nmcoKF1wsMD0Y70TmpnqCsw; userId=125419621; wm_order_channel=default; service-off=0; igateApp=%3C%25%3D%20htmlWebpackPlugin.options.iGateAppKey%20%25%3E; logan_session_token=8lqjx2590uihrsyq3vlx; logan_custom_report=; w_visitid=b8d9be81-e546-438a-ac83-4e83e95115fb; w_uuid=5737EF407F90A002AE885E541B62D03F943F2FC4EC7B5C511C5560B5E6574FCC; terminal=i; w_utmz="utm_campaign=(direct)&utm_source=5433&utm_medium=(none)&utm_content=(none)&utm_term=(none)"; w_latlng=39911267,116509875; w_actual_lat=39911267; w_actual_lng=116509875; w_token=IplXXLaGAatRU7wP5Z9w0etMSdUAAAAAQQoAAJtRnplGfuryswMbk4X1ow9Ihk0iz5gLak89Honu6L9nmcoKF1wsMD0Y70TmpnqCsw; openh5_uuid=5737EF407F90A002AE885E541B62D03F943F2FC4EC7B5C511C5560B5E6574FCC; cssVersion=d1b1c800; utm_source=; au_trace_key_net=default; _lx_utm=utm_source%3Dwap.sogou%26utm_medium%3Dorganic; openh5_uuid=5737EF407F90A002AE885E541B62D03F943F2FC4EC7B5C511C5560B5E6574FCC; _lxsdk_s=1711ff41294-788-c36-b9%7C%7C40`
	header["Referer"]="https://h5.waimai.meituan.com/waimai/mindex/kingkong?navigateType=910&firstCategoryId=910&secondCategoryId=910&title=%E7%BE%8E%E9%A3%9F"
	header["Cookie"]=cookie
	header["User-Agent"]="Mozilla/5.0 (Linux; U; Android 9; zh-CN; SEA-AL00 Build/HUAWEISEA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.9.2.1072 Mobile Safari/537.36"
	header["Content-Type"]="application/x-www-form-urlencoded"
	header=common.MergreHeader(header,common.CommonHeader)

	var postData string="startIndex=0&sortId=&navigateType=910&firstCategoryId=910&secondCategoryId=910&multiFilterIds=&sliderSelectCode=&sliderSelectMin=&sliderSelectMax=&actualLat=39.911267&actualLng=116.509875&initialLat=39.911267&initialLng=116.509875&geoType=2&rankTraceId=&uuid=5737EF407F90A002AE885E541B62D03F943F2FC4EC7B5C511C5560B5E6574FCC&platform=3&partner=4&originUrl=https%3A%2F%2Fh5.waimai.meituan.com%2Fwaimai%2Fmindex%2Fkingkong%3FnavigateType%3D910%26firstCategoryId%3D910%26secondCategoryId%3D910%26title%3D%25E7%25BE%258E%25E9%25A3%259F&riskLevel=71&optimusCode=10&wm_latitude=39911267&wm_longitude=116509875&wm_actual_latitude=39911267&wm_actual_longitude=116509875&openh5_uuid=5737EF407F90A002AE885E541B62D03F943F2FC4EC7B5C511C5560B5E6574FCC&_token=eJxdlNmuo0YQht%2FFknPjI7MZA0c6GoHZjM1iwNg4mgv2fW%2BzOMq7pz0zSZRIoKr6%2Bqeoorv4Y9Ufw9UnhmIUin2sxqhffa6wLbrdrz5WYIArJE0SNIYSOxInP1bBfxmDoR8rv3f41efvxB792JP7729gwvgHoGj0%2B8e%2FHoHD6604QsEqBaA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6MHkVeQmK%2BaRLi%2FGIrKolbm8VfzDXc3MTAFbnIQUVMM624LYGydK%2FA7%2BtaCwuCTDAv7E%2FPJ6W1HsDP8o0m3YUo%2BRCbiLtmhvgC57W%2FPH0zG%2FRezXOdQ8x9pGeGsfRWphsyjalcfVSmUQE0Qqnc9d49cpZHPKAfhdimJYOgEDrKNs4c%2Bxz%2FCjI273o1w5c62OE6UBcc8x6Umg7HuvGdK1Y9EJachdJRuBaJmq4Cm8ozxVTPEV%2FUs7sbx3kGz9xcEjd8njZ1TVox%2BcQkVtkIgiGq9xfLDDziO4pN1%2FQct7ReXpq4OEk3T%2B76ApgG8hJPSYkL3Uxdfe%2FeE6RKPad5E4%2FMxl79%2BRcRxvaC"

	res,err:=fetcher.MeiTuanPost(url,header,postData)
	if err!=nil{
		panic(err)
	}

	fmt.Printf("%s\n",res);


	//parse.MeituanMeishiH5List(res,models.DataFromParent{})



}
